<script name="Slot">
import { defineComponent, inject, h } from 'vue'
export default defineComponent({
  name: 'Slot',
  props: {
    row: {
      type: Object,
      default: () => null
    },
    index: {
      type: Number,
      default: null
    },
    column: {
      type: Object,
      default: () => null
    },
    slotName: {
      type: String,
      default: ''
    }
  },
  render(props) {
    const _this = inject('tableRoot')
    return h(
      'span',
      _this.slots[props.slotName]({
        row: props.row,
        column: props.column,
        $index: props.index
      })
    )
  }
})
</script>
